<?
/* @author Udo Schroeter <udo.schroeter@gmail.com>
 * @license dual license: LGPL / commercial use license
 */ 

  $config = array();

  if(strpos(PHP_OS, "WIN") !== false) 
    $config['os.path.separator'] = ';';
  else
    $config['os.path.separator'] = ':';

  ini_set('include_path', '.'.$config['os.path.separator'].'../');
  ini_set('session.cookie_httponly', 1);

  error_reporting(E_ALL ^ E_NOTICE);
  ini_set('display_errors', 'on');
    
  $config['site.ignoreport'] = true;
  $config['site.theme'] = 'default';
  $config['site.pagetemplate'] = 'default';
  $config['site.name'] = 'Unnamed Site';
  $config['site.defaultcontroller'] = 'default';
  $config['site.defaultaction'] = 'index';
  $config['site.languages'] = array('en' => 'English');
  $config['pageheaders'] = array();
  $config['loadmodel'] = array();
  $config['include'] = array();

  $config['accountmenu'] = array();
  $config['menu']['home'] = array('url' => 
    actionUrl($config['site.defaultaction'], $config['site.defaultcontroller']), 
    'caption' => 'Home');
  
  $cfgFiles[] = 'etc/config.db.php';
  $cfgFiles[] = 'etc/config.site.php';
  $cfgFiles[] = 'etc/config.server.'.$_SERVER['SERVER_NAME'].'.php';
  
  foreach ($cfgFiles as $fileName)
    if (file_exists($fileName))
      include($fileName); 
  
  if (substr($_SERVER['REQUEST_URI'], 0, 1) == '/')
  {
    include_once('lib/cq-url.php');
    interpretQueryString($_SERVER['REQUEST_URI']);
  }
  
  foreach ($_REQUEST as $k => $v)
    $_REQUEST[$k] = stripslashes(utf8_decode($v));
    
?>
